home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / FLTK-1.0.6 / fluid / Fluid_Image.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-29  |  2.0 KB  |  61 lines

  1. //
  2. // "$Id: Fluid_Image.h,v 1.3.2.1 1999/03/29 17:39:26 carl Exp $"
  3. //
  4. // Pixmap image header file for the Fast Light Tool Kit (FLTK).
  5. //
  6. // This class stores the image labels for widgets in fluid.  This is
  7. // not a class in fltk itself, and this will produce different types of
  8. // code depending on what the image type is.  There are private subclasses
  9. // in Fluid_Image.C for each type of image format.  Right now only xpm
  10. // files are supported.
  11. //
  12. // Copyright 1998-1999 by Bill Spitzak and others.
  13. //
  14. // This library is free software; you can redistribute it and/or
  15. // modify it under the terms of the GNU Library General Public
  16. // License as published by the Free Software Foundation; either
  17. // version 2 of the License, or (at your option) any later version.
  18. //
  19. // This library is distributed in the hope that it will be useful,
  20. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  22. // Library General Public License for more details.
  23. //
  24. // You should have received a copy of the GNU Library General Public
  25. // License along with this library; if not, write to the Free Software
  26. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  27. // USA.
  28. //
  29. // Please report all bugs and problems to "fltk-bugs@easysw.com".
  30. //
  31.  
  32. #ifndef FLUID_IMAGE_H
  33. #define FLUID_IMAGE_H
  34.  
  35. class Fluid_Image {
  36.   const char *name_;
  37.   int refcount;
  38. protected:
  39.   Fluid_Image(const char *name); // no public constructor
  40.   virtual ~Fluid_Image(); // no public destructor
  41. public:
  42.   int written;
  43.   static Fluid_Image* find(const char *);
  44.   void decrement(); // reference counting & automatic free
  45.   void increment();
  46.   virtual void label(Fl_Widget *) = 0; // set the label of this widget
  47.   virtual void write_static() = 0;
  48.   virtual void write_code() = 0;
  49.   const char *name() const {return name_;}
  50. };
  51.  
  52. // pop up file chooser and return a legal image selected by user,
  53. // or zero for any errors:
  54. Fluid_Image *ui_find_image(const char *);
  55.  
  56. #endif
  57.  
  58. //
  59. // End of "$Id: Fluid_Image.h,v 1.3.2.1 1999/03/29 17:39:26 carl Exp $".
  60. //
  61.